<template>
  <a-form
      :model="user"
      name="basic"
      :label-col="{ span: 8 }"
      :wrapper-col="{ span: 16 }"
      autocomplete="off"
      @finish=""
      @finishFailed="">
    <a-form-item label="用户名" name="username" :rules="[{ required: true, message: '请输入用户名' }]">
      <a-input :value="user.username"/>
    </a-form-item>

    <a-form-item label="密码" name="password" :rules="[{ required: true, message: '请输入密码' }]">
      <a-input-password v-model:value="user.password"/>
    </a-form-item>

    <a-form-item label="昵称" name="nickname" :rules="[{ required: true, message: '请输入用昵称' }]">
      <a-input :value="user.nickname"/>
    </a-form-item>

    <a-form-item label="状态" name="status">
      <a-tag color="#2db7f5">良好</a-tag>
      <a-tag color="#87d068">完美</a-tag>
    </a-form-item>

    <a-form-item v-if="false" :wrapper-col="{ offset: 8, span: 16 }">
      <a-button type="primary" html-type="submit" @click="submit">Submit</a-button>
    </a-form-item>
  </a-form>
</template>
<script lang="ts" setup>
import {SysUserClass} from "@/interface/SysUser.ts";
import {message} from "ant-design-vue";

const props = defineProps<{
  user: SysUserClass
}>();

const submit = () => {
  message.success('提交')
}

defineExpose({ submit });

</script>




